import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-05-04
 * Time: 19:02
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int seed = scanner.nextInt();
            Random random = new Random(seed);

            int index = random.nextInt(6);
            System.out.println(index+1);

        }
    }
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();

        System.out.println(Integer.toBinaryString(num));

    }
    public static void main9(String[] args) {
        String string = "HHHHHH";
        String str =string.replace("H","");
        System.out.println(str.length());
    }
        public static void main8(String[] args) {
            String string = "H e l l o ! n o w c o d e r";
            Scanner scanner= new Scanner(System.in);
            String word = scanner.next();
            scanner.close();
            string.replace("r","");
            System.out.println(check(string, word));
        }
        public static int check(String str,String word){
            return str.length() - str.replace(word,"").length();

        }


    public static void main7(String[] args) {
        String string = "H e l l o ! n o w c o d e r";
        Scanner scanner= new Scanner(System.in);
        String word = scanner.next();
        scanner.close();
        System.out.println(check(string, word));
    }

    public static int check1(String str, String word) {
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            char ret = str.charAt(i);
            char ret1 = word.charAt(0);
            if(ret1 == ret) {
                count++;
            }
        }
        return count;
    }
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        StringBuilder str1 = new StringBuilder(str);

        for(int i =str.length()-3;i>=0;i-=3 ) {
            str1.insert(i,',');
        }

        System.out.println(str1.toString());
    }
    public static void main5(String[] args) {
        String str = "hellonowcoder";
        StringBuilder str1 = new StringBuilder(str);
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();


        char[] ret = new char[20];
        int len = str.length() ;
        int input = len / 3;
        int index = len +input-1;
        while(index >= 0) {
            int count = 3;
            while(count > 0 && index > 0) {
                char ch = str.charAt(len-1);
                ret[index] = ch;
                len--;
                count--;
                index--;
            }
            ret[index] = ',';
            index--;
        }
        String str1 = new String(ret);
        System.out.println(str1);
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            Sub sub = new Sub(x, y);
            System.out.println(sub.sum());
        }
    }

}

class Base {

    private int x;
    private int y;

    public Base(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public final int getY() {
        return y;
    }

    public final int sum() {
        return getX() + getY();
    }

}

class Sub extends Base {

    public Sub(int x, int y) {
        super(x, y);
    }

    public int getX() {
        return super.getX()*10;
    }
}
